// 引入自定义路由组件
/* import ArtAdd from '@pages/ArtAdd'
import ArtList from '@pages/ArtList'
import ArtEdit from '@pages/ArtEdit'
import DashBoard from '@pages/DashBoard'
import MsgList from '@pages/MsgList' */
/* 预先导入 路由预加载 */
import Settings from '@pages/Settings'
// 引入字体图标
import { AreaChartOutlined,EditOutlined,MessageOutlined,SettingOutlined   } from '@ant-design/icons'
/* 路由懒加载 */
import { lazy } from 'react'
// 定义数组存放路由
const routes = [
  {
    // 路由路径
    path: '/admin/dashBoard',
    // 路由名称
    name:"仪表盘",
    // 匹配的路由组件
    component: lazy( ()=> import('@pages/DashBoard')),
    /* 权限信息 */
    roles: ['admin','superAdmin','editor'],
    // 路由元信息
    meta: {
      // 是否需要左侧的导航显示
      isNav: true,
      // 字体图标
      icon: AreaChartOutlined
    }
  },
  {
    path: '/admin/artAdd',
    name:"增加文章",
    component: lazy( ()=> import('@pages/ArtAdd') ),
    roles: ['admin','superAdmin','editor'],
    meta: {
      isNav: false
    }
  },
  {
    path: '/admin/artList',
    name:'文章管理',
    component: lazy( ()=> import('@pages/ArtList') ),
    roles: ['admin','superAdmin','editor'],
    meta: {
      isNav: true,
      icon: EditOutlined
    }
  },
  {
    path: '/admin/artEdit',
    name:'文章编辑',
    component: lazy( ()=> import('@pages/ArtEdit') ),
    roles: ['admin','superAdmin','editor'],
    meta: {
      isNav: false
    }
  },
  {
    path: '/admin/msgList',
    name:'消息中心',
    component: lazy( ()=> import('@pages/MsgList') ),
    roles: ['admin','superAdmin','editor'],
    meta: {
      isNav: true,
      icon: MessageOutlined
    }
  },
  {
    path: '/admin/settings',
    name:'设置',
    component: Settings,
    roles: ['superAdmin','editor'],
    meta: {
      isNav: true,
      icon: SettingOutlined
    }
  },
  {
    path: '/admin/noPermission',
    name:'没有权限',
    component: lazy( ()=> import('@pages/NoPermission') ),
    roles: ['superAdmin','admin' ,'editor'],
    meta: {
      isNav: false,
    }
  }
]
// 导出路由
export default routes